package com.dragon.modules.yuegou.query.merchant;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.merchant.ActivityFaqEntity;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;

/**
 * 咨询 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2019-09-23 14:37:50
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class ActivityFaqQuery extends ActivityFaqEntity implements Query<ActivityFaqEntity> {

	private static final long serialVersionUID = 1L;


    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 商圈Id查询条件 */
	@JsonUnwrapped(prefix = "busdId")
	private Condition<String> busdIdCondition;

    /** 标题查询条件 */
	@JsonUnwrapped(prefix = "title")
	private Condition<String> titleCondition;

    /** 图片json 数组查询条件 */
	@JsonUnwrapped(prefix = "content")
	private Condition<String> contentCondition;

    /** 排序查询条件 */
	@JsonUnwrapped(prefix = "sortNo")
	private Condition<Integer> sortNoCondition;

    /** 对应的栏目id查询条件 */
	@JsonUnwrapped(prefix = "columnId")
	private Condition<String> columnIdCondition;

    /** 创建人Id查询条件 */
	@JsonUnwrapped(prefix = "createdBy")
	private Condition<String> createdByCondition;

    /** 创建时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public ActivityFaqQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public ActivityFaqQuery(ActivityFaqEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public ActivityFaqQuery(ActivityFaqQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.busdIdCondition != null) {
			this.busdIdCondition = other.busdIdCondition.copy();
		}
		if(other.titleCondition != null) {
			this.titleCondition = other.titleCondition.copy();
		}
		if(other.contentCondition != null) {
			this.contentCondition = other.contentCondition.copy();
		}
		if(other.sortNoCondition != null) {
			this.sortNoCondition = other.sortNoCondition.copy();
		}
		if(other.columnIdCondition != null) {
			this.columnIdCondition = other.columnIdCondition.copy();
		}
		if(other.createdByCondition != null) {
			this.createdByCondition = other.createdByCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<ActivityFaqEntity> toQueryWrapper() {
		QueryWrapper<ActivityFaqEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (busdIdCondition != null) {
			busdIdCondition.toWrapper(wrapper, COL_BUSD_ID);
		}
		if (titleCondition != null) {
			titleCondition.toWrapper(wrapper, COL_TITLE);
		}
		if (contentCondition != null) {
			contentCondition.toWrapper(wrapper, COL_CONTENT);
		}
		if (sortNoCondition != null) {
			sortNoCondition.toWrapper(wrapper, COL_SORT_NO);
		}
		if (columnIdCondition != null) {
			columnIdCondition.toWrapper(wrapper, COL_COLUMN_ID);
		}
		if (createdByCondition != null) {
			createdByCondition.toWrapper(wrapper, COL_CREATED_BY);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回商圈Id查询条件
	 * 
	 * @return busdIdCondition 商圈Id查询条件
	 */
	public Condition<String> busdId() {
		this.busdIdCondition = new Condition<>();
		return this.busdIdCondition;
	}
	
	/**
	 * 获取商圈Id查询条件
	 * 
	 * @return busdIdCondition 商圈Id查询条件
	 */
	public Condition<String> getBusdIdCondition() {
		return busdIdCondition;
	}

	/**
	 * 设置商圈Id查询条件
	 * 
	 * @param busdIdCondition 商圈Id查询条件
	 */
	public void setBusdIdCondition(Condition<String> busdIdCondition) {
		this.busdIdCondition = busdIdCondition;
	}

	/**
	 * 构造并返回标题查询条件
	 * 
	 * @return titleCondition 标题查询条件
	 */
	public Condition<String> title() {
		this.titleCondition = new Condition<>();
		return this.titleCondition;
	}
	
	/**
	 * 获取标题查询条件
	 * 
	 * @return titleCondition 标题查询条件
	 */
	public Condition<String> getTitleCondition() {
		return titleCondition;
	}

	/**
	 * 设置标题查询条件
	 * 
	 * @param titleCondition 标题查询条件
	 */
	public void setTitleCondition(Condition<String> titleCondition) {
		this.titleCondition = titleCondition;
	}

	/**
	 * 构造并返回图片json 数组查询条件
	 * 
	 * @return contentCondition 图片json 数组查询条件
	 */
	public Condition<String> content() {
		this.contentCondition = new Condition<>();
		return this.contentCondition;
	}
	
	/**
	 * 获取图片json 数组查询条件
	 * 
	 * @return contentCondition 图片json 数组查询条件
	 */
	public Condition<String> getContentCondition() {
		return contentCondition;
	}

	/**
	 * 设置图片json 数组查询条件
	 * 
	 * @param contentCondition 图片json 数组查询条件
	 */
	public void setContentCondition(Condition<String> contentCondition) {
		this.contentCondition = contentCondition;
	}

	/**
	 * 构造并返回排序查询条件
	 * 
	 * @return sortNoCondition 排序查询条件
	 */
	public Condition<Integer> sortNo() {
		this.sortNoCondition = new Condition<>();
		return this.sortNoCondition;
	}
	
	/**
	 * 获取排序查询条件
	 * 
	 * @return sortNoCondition 排序查询条件
	 */
	public Condition<Integer> getSortNoCondition() {
		return sortNoCondition;
	}

	/**
	 * 设置排序查询条件
	 * 
	 * @param sortNoCondition 排序查询条件
	 */
	public void setSortNoCondition(Condition<Integer> sortNoCondition) {
		this.sortNoCondition = sortNoCondition;
	}

	/**
	 * 构造并返回对应的栏目id查询条件
	 * 
	 * @return columnIdCondition 对应的栏目id查询条件
	 */
	public Condition<String> columnId() {
		this.columnIdCondition = new Condition<>();
		return this.columnIdCondition;
	}
	
	/**
	 * 获取对应的栏目id查询条件
	 * 
	 * @return columnIdCondition 对应的栏目id查询条件
	 */
	public Condition<String> getColumnIdCondition() {
		return columnIdCondition;
	}

	/**
	 * 设置对应的栏目id查询条件
	 * 
	 * @param columnIdCondition 对应的栏目id查询条件
	 */
	public void setColumnIdCondition(Condition<String> columnIdCondition) {
		this.columnIdCondition = columnIdCondition;
	}

	/**
	 * 构造并返回创建人Id查询条件
	 * 
	 * @return createdByCondition 创建人Id查询条件
	 */
	public Condition<String> createdBy() {
		this.createdByCondition = new Condition<>();
		return this.createdByCondition;
	}
	
	/**
	 * 获取创建人Id查询条件
	 * 
	 * @return createdByCondition 创建人Id查询条件
	 */
	public Condition<String> getCreatedByCondition() {
		return createdByCondition;
	}

	/**
	 * 设置创建人Id查询条件
	 * 
	 * @param createdByCondition 创建人Id查询条件
	 */
	public void setCreatedByCondition(Condition<String> createdByCondition) {
		this.createdByCondition = createdByCondition;
	}

	/**
	 * 构造并返回创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置创建时间查询条件
	 * 
	 * @param createdTimeCondition 创建时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

}
